package com.lzy.api.controller.admin;

import com.lzy.grace.result.GraceJSONResult;
import com.lzy.pojo.bo.AdminLoginBO;
import com.lzy.pojo.bo.NewAdminBO;
import com.lzy.pojo.bo.SaveFriendLinkBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

@Api(value = "首页友情链接维护",tags = {"首页友情链接维护的controller"})
@RequestMapping("friendLinkMng")
public interface FriendLinkMngControllerApi {

    @ApiOperation(value = "新增或者修改友情链接",notes = "新增或者修改友情链接",httpMethod = "POST")
    @PostMapping("/saveOrUpdateFriendLink")
    public GraceJSONResult saveOrUpdateFriendLink(@RequestBody @Valid SaveFriendLinkBO saveFriendLinkBO,
                                                 BindingResult result);

    @ApiOperation(value = "查询友情链接列表",notes = "查询友情链接列表",httpMethod = "POST")
    @PostMapping("/getFriendLinkList")
    public GraceJSONResult getFriendLinkList();


    @ApiOperation(value = "删除友情链接",notes = "删除友情链接",httpMethod = "POST")
    @PostMapping("/delete")
    public GraceJSONResult delete(@RequestParam String linkId);

    @GetMapping("portal/list")
    @ApiOperation(value = "首页查询友情链接列表", notes = "首页查询友情链接列表", httpMethod = "GET")
    public GraceJSONResult getPortalFriendLinkList();


}
